package com.ocm.shop.feign;

import com.ocm.shop.entity.Shop;
import com.ocm.shop.service.IShopService;
import lombok.AllArgsConstructor;
import com.ocm.core.tool.api.R;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author hqy
 * @Date 11/01/2022
 * @Description
 */
@RestController
@AllArgsConstructor
public class ShopClient implements IShopClient{

	private final IShopService shopService;

	@Override
	@GetMapping(API_PREFIX+"/shop-info-by-id")
	public R<Shop> shopInfo(Long shopId) {
		return R.data(shopService.getById(shopId));
	}
}
